/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.gac.gacmod.visual;

import java.awt.Dimension;
import org.gac.gacmod.model.CompositeStep;
import org.netbeans.api.visual.widget.Widget;

/**
 *
 * @author Tomek
 */
public class InnerStepWrapperWidget extends Widget
{

    public InnerStepWrapperWidget(BoxScene scene, StepWidgetBase innerStep,
            boolean horizontal, CompositeStep parentModelStep, int location)
    {
        super(scene);
        if (horizontal)
        {
            this.setLayout(Layouts.HorizontalLayout);
            this.addChild(innerStep);
            Widget w = new Widget(scene);
            //w.setMinimumSize(new Dimension( 15, 0));
            this.addChild( w );
            DropAreaWidget drop = new DropAreaWidget(scene, false, 
                    parentModelStep, location);
            this.addChild( drop );
            //scene.addDropAreaWidget(drop);
        }
        else
        {
            this.setLayout(Layouts.VerticalLayout);
            this.addChild(innerStep);
            Widget w = new Widget(scene);
            //w.setMinimumSize(new Dimension( 0, 15));
            this.addChild( w );
                        DropAreaWidget drop = new DropAreaWidget(scene, true, 
                                parentModelStep, location);
            this.addChild( drop );
            //scene.addDropAreaWidget(drop);
        }
    }
}
